import Vue from 'vue'
import VueRouter, { RouteConfig } from 'vue-router'


Vue.use(VueRouter)

const routes: Array<RouteConfig> = [
  {
    path:'/',
    name:'login',
    component:() => import('../src/views/login/index.vue'),
  },
  
  {
    path: '/Main',
    name: 'Main',
    component: () => import('../src/views/Main.vue'),    
    children:[
      {
        path:'/home',
        name:'home',
        component:() => import('../src/views/home/index.vue')
      },
      {
        path: '/users',
        name: 'users',
        component: () => import('../src/views/users/index.vue')
      },
      {
        path: '/importMRI',
        name: 'importMRI',
        component: () => import('../src/views/import/MRI.vue')
      },
      {
        path: '/importCT',
        name: 'importCT',
        component: () => import('../src/views/import/CT.vue')
      },
    ]
  },
  
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
